home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Testing & Debugging / Virtual User tools / SPEC S&L v.1.0.1 / Libraries / Text.Lib < prev    next >
Encoding:
Text File  |  1993-12-17  |  2.8 KB  |  93 lines  |  [TEXT/MPS ]

  1. #
  2. # ****************************************************************************
  3. #
  4. #    File Name:        Text.Lib
  5. #
  6. #    Contains:    xxx put contents here xxx
  7. #
  8. #    Written by:    Kevin Avoy, Ken Landreth, Michael Leong, Gil Spencer et al
  9. #
  10. #    Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  11. #
  12. # ****************************************************************************
  13. #            C h a n g e        H i s t o r y (most recent first):
  14. # ****************************************************************************
  15. #
  16. #        Vers      Date        Author        Description
  17. #        ----    --------    ------    ---------------------------------------------
  18. #        <1+>     5/21/93    NAGA        Adding header and porting old files to follow new standards
  19. #
  20. # ****************************************************************************
  21. #
  22.  
  23. ########################################################################
  24. #                            External libraries 
  25. #=======================================================================
  26. Libraries "Font.Lib","String.Lib";
  27.  
  28.  
  29.  
  30. #########################################################################
  31. #                             TypeWord(pNumChars := 'Random')
  32. #=======================================================================
  33. # Author:              
  34. # Description:         
  35. # Parameters:        
  36. # Example:            
  37. #=======================================================================
  38. # History:
  39. #
  40. #########################################################################
  41. TASK TypeWord(pNumChars := 'Random')
  42. begin
  43.     if (pNumChars = 'Random')
  44.     begin
  45.         randomWord := RandomString(Random(1,10));
  46.         Type k:{"{randomWord} "};
  47.     end;
  48. end;
  49.  
  50. #########################################################################
  51. #                             TypeSentence(pNumWords := 20)
  52. #=======================================================================
  53. # Author:              
  54. # Description:         
  55. # Parameters:        
  56. # Example:            
  57. #=======================================================================
  58. # History:
  59. #
  60. #########################################################################
  61. TASK TypeSentence(pNumWords := 20) 
  62. begin
  63.     for i := 1 to pNumWords
  64.         TypeWord();
  65.     punctuationList :={'!',',','.','?',':',';'};
  66.     RandPunct := Random(1,(Card(punctuationList)));
  67.     whichPunct := punctuationList[RandPunct];
  68.     Type k:{whichPunct};
  69. end;
  70.  
  71. #########################################################################
  72. #                             TypeParagraph(pNumSentences := 6)
  73. #=======================================================================
  74. # Author:              
  75. # Description:         
  76. # Parameters:        
  77. # Example:            
  78. #=======================================================================
  79. # History:
  80. #
  81. #########################################################################
  82. TASK TypeParagraph(pNumSentences := 6)
  83. begin
  84.     Type K:{tabKey};
  85.     for i := 1 to pNumSentences
  86.     begin
  87.         SetFontParams(RandomFontRecords());
  88.         TypeSentence();
  89.         Type K:{"  "};
  90.     end;
  91.     Type K:{returnKey, returnKey};
  92. end;
  93.